package com.meilai.project.controller.web.report.mapper;

import com.meilai.project.controller.web.report.entity.WeekReportFloorOccupy;
import com.meilai.project.controller.web.report.entity.WeekReportOccupy;
import com.meilai.project.controller.web.report.vo.WeekDetailVO;
import com.meilai.project.controller.web.report.vo.WeekDetailVO2;
import com.meilai.project.controller.web.report.vo.WeekReportFloorOccupy2;
import com.meilai.project.controller.web.report.vo.WeekSummaryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * @author xchen
 * @since 2022-04-09
 */
@Mapper
public interface WeekReportMapper {

    List<WeekSummaryVO> queryBuildingBaseInfo();

    LocalDate queryMaxOccupyDate();

    List<WeekReportOccupy> querySummaryOccupy(@Param("start_date") LocalDate startDate);

    List<WeekReportOccupy> querySummaryOccupy(@Param("start_date") LocalDate startDate, @Param("end_date") LocalDate endDate);

    List<WeekReportOccupy> querySummaryPreLocking(@Param("start_date") LocalDate startDate, @Param("end_date") LocalDate endDate);

    List<WeekDetailVO> queryBuildingFloorByBuildingId(@Param("building_area_id") Long building_area_id);

    List<WeekDetailVO2> queryBuildingFloorByBuildingIds(@Param("building_area_ids") List<Long> building_area_ids);

    List<WeekReportFloorOccupy> queryFloorOccupyByBuildingId(
            @Param("building_area_id") Long building_area_id,
            @Param("start_date") LocalDate startDate,
            @Param("end_date") LocalDate endDate
    );

    List<WeekReportFloorOccupy2> queryFloorOccupyByBuildingIds(
            @Param("building_area_ids") List<Long> building_area_ids,
            @Param("start_date") LocalDate startDate,
            @Param("end_date") LocalDate endDate
    );
}
